import 'react-app-polyfill/ie11';
import 'react-app-polyfill/stable';
import 'antd/dist/antd.less';
import './assets/reset_antd.less';
import './assets/reset.less';
import 'edframe/assets/styles/global.less';
import React from 'react';
import ReactDOM from 'react-dom';
import { HashRouter, Switch, Route } from 'react-router-dom';
import routes from 'router/index';
import { ConfigProvider } from 'antd';
import zhCN from 'antd/es/locale/zh_CN';
import moment from 'moment';
import 'moment/locale/zh-cn';
import 'edframe/utils/date';

moment.locale('zh-cn');
const App = () => (
    <ConfigProvider locale={zhCN}>
        <HashRouter>
            <Switch>
                {routes.map(route => (
                    <Route key={route.ywdm} component={route.component} exact
                        path={route.path}
                    />
                ))}
            </Switch>
        </HashRouter>
    </ConfigProvider>
);

ReactDOM.render(<App />, document.getElementById('root'));
